#ifndef BLOCKFREELIST_H
#define BLOCKFREELIST_H

#define SUPER_BLOCK_NUMBER 0
#define DISK_SIZE 100000000
#define BLOCK_SIZE 1024
#define BITS_PER_BYTE 8


//bitmap[0] = superblock & directory
//bitmap[1-15] = inodes
//bitmap[16-] = blocknumbers
//each element of bitmap will represent 32 block numbers

struct blockFreeList{
  int numberofelements;
  int bitmap[DISK_SIZE/(BLOCK_SIZE*sizeof(int) * BITS_PER_BYTE)];
}freelist;

int initFreeList();

int getUnusedBlockNumber();
int getUnusedInodeNumber();

void setBlockToUsed(int blockNumber);
void setBlockToUnused(int blockNumber);

#endif
